package tcu.iot.gasmanage.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;
import tcu.iot.gasmanage.entity.equipmentcard.EquipmentCardReturn;

@Repository
@Mapper
@Component("EquipmentCardMapper")
public interface EquipmentCardMapper {

    @Select("SELECT equipmentNumber,equipmentName,uploadFrequency,province,region,site,pipeline,principal," +
            "electricQuantity FROM equipment WHERE equipmentNumber=#{equipmentNumber}")
    EquipmentCardReturn GetEquipmentInfo(String equipmentNumber);

    @Select("SELECT imgUrl FROM picture WHERE equipmentNumber=#{equipmentNumber}")
    String GetImgUrl(String equipmentNumber);
}
